﻿using System.Linq.Expressions;
using System.Threading.Tasks;

namespace DataSyncCommon
{
    /// <summary>
    /// 系统配置
    /// </summary>
    public class SysConfig
    {
        /// <summary>
        /// 执行时间分钟
        /// </summary>
        public static int monitorjob { get; set; }
        /// <summary>
        /// 下载基础数据job天
        /// </summary>
        public static int downbasejob { get; set; }
        /// <summary>
        /// 上传业务数据job分钟
        /// </summary>
        public static int upbusjob { get; set; }

        public static readonly Task CompletedTask = Task.FromResult(true);
        /// <summary>
        /// 域名
        /// </summary>
        public static string seraddress = "http://47.113.26.39";
        public static string port = "5007/SupForOut/SupDataSync";
        /// <summary>
        /// 地址加端口 url+/方法名称
        /// </summary>
        public static string url = string.Join(":", seraddress, port);
        /// <summary>
        /// 本地数据库连接串
        /// </summary>
        public static string ConnectionStr { get; set; }
        /// <summary>
        /// 数据库IP
        /// </summary>
        public static string ClientIP { get; set; }
        /// <summary>
        /// 数据库端口
        /// </summary>
        public static string ClientPort { get; set; }
        /// <summary>
        /// 数据库名
        /// </summary>
        public static string ClientDbName { get; set; }
        /// <summary>
        /// 数据库用户名
        /// </summary>
        public static string ClientUser { get; set; }
        /// <summary>
        /// 数据库密码
        /// </summary>
        public static string ClientPwd { get; set; }

        /// <summary>
        /// 要导入的租户ID
        /// </summary>
        public static int TenantId { get; set; }
        /// <summary>
        /// 服务超时时长（秒）
        /// </summary>
        public static int TimeOutSecond { get; set; } = 300;
        /// <summary>
        /// 测试服务
        /// </summary>
        public static string TestApiUrl { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public static string GetTenantApiUrl { get; set; }
        private static string syncurl = ""; 
        /// <summary>
        /// 基础数据服务
        /// </summary>
        public static string SyncBaseApiUrl
        {
            get
            {
                return syncurl;// +  ":5007/SupForOut/SupDataSync";
            }
            set
            {
                syncurl = value;
            }
        }
        /// <summary>
        /// 业务数据服务
        /// </summary>
        public static string SyncBusinessApiUrl { get; set; }
    }
}
